<template>
	<view class="content">
		<u-navbar :bgColor="bgColor" leftIconSize="0" height="88rpx">
			<view class="" slot="center">
				<view class="flex-box areas">
					<navigator url="/pages/home/locate/locate" hover-class="none">
						<view class="city-picker flex-box flex-center colf">{{now_city}}</view>
					</navigator>
					<view v-if="false">
						<!-- #ifndef MP -->
						<navigator url="/pages/home/search/search" hover-class="none">
							<view class="flex-box  inputbox">
								<image src="/static/icon/icon_search.png" class="icon_search"></image>
								<view class="colf fs22">请输入小区</view>
							</view>
						</navigator>
						<!-- #endif -->
						<!-- #ifdef MP -->
						<navigator url="/pages/home/search/search" hover-class="none" class="flex-grow-1">
							<view class="flex-box inputbox" style="width: 385rpx;">
								<image src="/static/icon/icon_search.png" class="icon_search"></image>
								<view class="colf fs22">请输入小区</view>
							</view>
						</navigator>
						<!-- #endif -->
					</view>
				</view>
			</view>
		</u-navbar>
		<view class="container">
			<view class="topscroll">
				<view v-if="advert_data2.length > 0" class="swiper-box">
					<swiper class="swiper colf" circular @animationfinish="swiperChange2" :current="advert_data2_index"
						:autoplay="autoplayStatus" interval="5000" duration="500">
						<swiper-item v-for="item in advert_data2" :key="item">
							<view class="relative">
								<image @tap.stop.prevent="jumpAdvertTo" :data-param="item" :src="item.image_text"
									lazy-load class="index_bg" mode="widthFix"></image>
							</view>
						</swiper-item>
					</swiper>
					<view class="swiper-dots flex-box flex-center">
						<view v-for="(item, index) in advert_data2" :key="index">
							<view :class="['swiper-dot', index == advert_data2_index ? 'active' : '']"></view>
						</view>
					</view>
				</view>
				<view v-else class="noswiper"></view>
				<view class="bg3f">
					<view class="search">
						<navigator url="/pages/home/search/search" hover-class="none">
							<view class="flex-box inputbox">
								<image src="/static/icon/icon_search-g.png" class="icon_search"></image>
								<view class="colf fs22">请输入小区</view>
							</view>
						</navigator>
					</view>
					<view class="navbox flex-box">
						<template v-for="(item, index) in indexShowData">
						
							<view v-if="item.jump_type == 1&&item.id==1" hover-class="none" class="navitem" @tap="jumpPages"
								data-url="/pages/home/building_list/building_list?type_id=18" data-type="2">
								<image :src="webUrl+item.image"></image>
								<view>{{ item.name }}</view>
							</view>
							<view v-if="item.jump_type == 1&&item.id==4" hover-class="none" class="navitem" @tap="jumpPages"
								data-url="/pages/home/map_search/map_search" data-type="2">
								<image :src="webUrl+item.image"></image>
								<view>{{ item.name }}</view>
							</view>
							<view v-else-if="item.jump_type == 2" hover-class="none" class="navitem" @tap="jumpPages"
								data-url="/pages/home/building_list/building_list?sale_state=1" data-type="2">
								<image :src="webUrl+item.image"></image>
								<view>{{ item.name }}</view>
							</view>
							<view v-else-if="item.jump_type == 3" hover-class="none" class="navitem" @tap="jumpPages"
								data-url="/pages/home/building_list/building_list?sale_state=3" data-type="2">
								<image :src="webUrl+item.image"></image>
								<view>{{ item.name }}</view>
							</view>
							<view v-else-if="item.jump_type == 4" hover-class="none" class="navitem" @tap="jumpPages"
								:data-url="'/pages/home/building_list/building_list?type_id=' + item.house_type_id"
								data-type="2">
								<image :src="webUrl+item.image"></image>
								<view>{{ item.name }}</view>
							</view>
							<view v-else-if="item.jump_type == 6" class="navitem" @tap="jumpPages" data-url="/pages/rental/renting_list/renting_list?sale_state=0" data-type="1" >
								<image :src="webUrl+item.image"></image>
								<view>{{ item.name }}</view>
							</view>
							<view v-else-if="item.jump_type == 7" @tap="jumpPages" :data-url="'/pages/rental/renting_list/renting_list?tag_id='+item.rent_tag_id" data-type="1" class="navitem" >
								<image :src="webUrl+item.image"></image>
								<view>{{ item.name }}</view>
							</view>
							<view v-else-if="item.jump_type == 8" class="navitem" @tap="jumpPages"
								:data-url="'/pages/rental/renting_list/renting_list?rental_mode_id='+item.rent_mode_id" data-type="1" >
								<image :src="webUrl+item.image"></image>
								<view>{{ item.name }}</view>
							</view>
							<!-- <view v-else hover-class="none" class="navitem" @tap="jumpPages"
								:data-url="'/pages/home/building_list/building_list?tag_id=' + item.house_tag_id"
								data-type="2">
								<image :src="item.image"></image>
								<view>{{ item.name }}</view>
							</view> -->
						</template>
					</view>
				</view>
					
				<view class="flex-box flex-between title">
					<view class="fs34 fwb new_title">
						<text>人气好房</text>
						<view class="tips">热搜房源 精选推荐</view>
					</view>
					
					<view class="navigator" hover-class="none" @tap="jumpPages"
						data-url="/pages/home/building_list/building_list?type_id=1" data-type="2">更多+</view>
				</view>
			</view>
			<!-- 房源列表 -->
			<view class="houselist">
				<template v-if="houseList.total > 0">
					<template v-for="(item, index) in houseList.data">
						<!-- <navigator class="houseitem flex" :url="'/pages/house/building_detail/building_detail?id=' + item.id" open-type="navigate" @click="goToDe(item)"> -->
						<view class="houseitem flex" @click="goToDe(item)">
							<view class="flex-box targets">
								<view v-if="item.house_tag_ids_text1" class="tar1">{{ item.house_tag_ids_text1 }}</view>
							</view>
							<view class="houseimg">
								<u--image :showLoading="true" :lazy-load="true" :src="webUrl+item.image" radius="10rpx"
									width="240rpx" height="190rpx" mode="aspectFill"></u--image>
							</view>
							<view class="flex-grow-1">
								<view class="housename m-ellipsis fwb">{{ item.name }}</view>
								<view class="area-size">
									<text>{{ item.list_labels?item.list_labels:'' }}</text>
									<text class="plr10">|</text>
									<text>建面{{ item.min_space }}㎡</text>
									<!-- <text>建面{{ item.min_space }}㎡-{{ item.max_space }}㎡</text> -->
								</view>
								<view class="targetbox flex-box flexwa">
									<view v-for="(targets, index2) in item.house_tag_ids_text_arr2" :key="index2" class="targetitem">
										{{ targets }}
									</view>
									<view v-if="item.rank_json_text" class="number_one">
										<image src="/static/icon/icon_reward.png" class="icon_reward"></image>
										<view>{{ item.rank_json_text }}</view>
									</view>
								</view>
								<view class="housecost fwb">
									<text class="pr20">{{ item.price }}万</text>
									<text class="junjia">{{item.unit_price}}元/平</text>
									<!-- {{ item.first_price_msg ? item.first_price_msg : '' }} -->
								</view>
							</view>
						</view>
					</template>
					<u-loadmore :status="loadStatus" fontSize="24" line loading-text="努力加载中" loadmore-text="轻轻上拉"
						nomore-text="没有更多了" />
				</template>
				<template v-else>
					<u-empty mode="data" text="暂无数据" textSize="24" icon="/static/images/none-data.png">
					</u-empty>
				</template>
			</view>
			<!-- 房源列表 -->
		</view>

<!-- 		<button @tap="addAppointLog" data-type="2" data-subtype="0" class="consult_btn flex-box flex-col flex-center">
			<image src="/static/icon/icon_kefu-b.png"></image>
			<view class="fs20 col3 pt10">咨询</view>
		</button> -->
		<view @tap="bindPhoneCall" data-type="2" data-subtype="0" class="consult_btn flex-box flex-col flex-center">
			<image src="/static/icon/icon_kefu-b.png"></image>
			<view class="fs20 col3 pt10">电话咨询</view>
		</view>

		<!-- 悬浮广告start -->
		<u-popup :show="firstpop" mode="center" @tap="closeadv" bgColor="transparent">
			<view class="firstpop">
				<swiper @animationfinish="swiperChange1" :current="advert_data1_index"
					style="width:600rpx;height:700rpx;">
					<swiper-item v-for="(item, index09) in advert_data1" :key="index09">
						<image @tap.stop.prevent="jumpAdvertTo" :data-param="item" :src="item.image_text" lazy-load
							mode="aspectFill" class="banner"></image>
					</swiper-item>
				</swiper>
				<image src="/static/icon/u-icon-close1.png" class="u-icon-close" @tap="closeadv"></image>
			</view>
		</u-popup>
		<!-- 悬浮广告end -->
		<!-- 预约弹窗start -->
		<u-popup :show="popupStatus" mode="center" closeable :safeAreaInsetBottom="false" @close="closePopupStatus"
			closeOnClickOverlay>
			<view class="zixun-pop">
				<view class="fs40 black tc mb20">我要咨询</view>
				<view class="fs30 col-darkGray tc mb40">
					<view>{{consults}}</view>
				</view>
				<view class="input-box flex-box plr30 mb40" v-if="popupStatus"><input @input="appoint_mobileFun"
						:value="appoint_mobile" class="input flex-grow-1" type="number" placeholder="请输入手机号码"
						placeholder-style="color:#ccc;" /></view>
				<view @tap="submitAppointLog" class="btn1 mb30">确认</view>
				<!-- <view @tap="jumpToChat" :data-uid="broker_user_id" class="btn2 mb20">立即微聊</view> -->
				<button open-type="contact" @click="handleContact" class="btn2 mb20">立即微聊</button>
			</view>
		</u-popup>
		<!-- 预约弹窗end -->
		<!-- 预约成功弹窗start -->
		<u-popup :show="reserveStatus" mode="center" closeable :safeAreaInsetBottom="false" @close="closeReserveStatus"
			closeOnClickOverlay>
			<view class="reserve">
				<image src="/static/icon/icon_reserve.png" class="icon_reserve"></image>
				<view class="title1">预约成功</view>
				<view class="title2">用手机号码{{ appoint_mobile_text }}预约了咨询服务，稍后经纪人将为您解答疑问，请注意接听电话</view>
				<button @tap="closeReserveStatus" class="reserve-btn1">好的</button>
				<!-- <button @tap="jumpToChat" :data-uid="broker_user_id" class="reserve-btn2">立即微聊</button> -->
				<button open-type="contact" @click="handleContact" class="reserve-btn2">立即微聊</button>
			</view>
		</u-popup>
		<!-- 预约成功弹窗end -->

		<u-popup :show="areapop" mode="bottom" @close="open_area_pop" :safeAreaInsetBottom="false" closeOnClickOverlay>
			<view class="chooseareawrap">
				<view class="flex-box flex-center focus">
					<view class="active">关注区域</view>
					<view>关注板块</view>
				</view>
				<view class="flex">
					<view class="singleprice  flex-grow-1">
						<view @tap="chooseLeft" data-index="-1" :class="'price-left ' + (is_left_none ? 'active' : '')">
							<view>不限</view>
						</view>
						<view v-for="(item, index10) in areaData" :key="index10" @tap="chooseLeft" :data-index="index"
							:class="'price-left ' + (now_show_region_index == index ? 'active' : '')">
							<view>{{ item.name }}</view>
							<image :src="'/static/icon/icon_choose' + (item.is_choose ? '-on' : '') + '.png'"
								class="choose"></image>
						</view>
					</view>
					<view class="rangeprice  flex-grow-1">
						<view @tap="chooseRight" data-index="-1"
							:class="'price-right ' + (is_right_none ? 'active' : '')">
							<view>不限</view>
						</view>
						<template v-if="now_show_region_index > -1">
							<view @tap="chooseRight" :data-index="index"
								:class="'price-right ' + (item.is_choose ? 'active' : '')"
								v-for="(item, index11) in areaData[now_show_region_index].list" :key="index11">
								<view>{{ item.name }}</view>

								<image :src="'/static/icon/icon_choose' + (item.is_choose ? '-on' : '') + '.png'"
									class="choose"></image>
							</view>
						</template>
					</view>
				</view>
				<view class="flex-box flex-between btuttons">
					<button class="btn1" @tap="clearLeftRight">清空</button>
					<button class="btn2" @tap="confirmLeftRight">确定</button>
				</view>
			</view>
		</u-popup>

		<!-- 选择户型弹窗 -->
		<u-popup :show="ortherpop" mode="bottom" @close="open_orther_pop" :safeAreaInsetBottom="false"
			closeOnClickOverlay>
			<view class="huxing-pop">
				<view class="head fs28 black">理想户型</view>
				<view class="body">
					<view class="flex-box flex-wrap mb25 typebox">
						<!-- <view :class="'typeitem ' + (room_num_index == -1 ? 'active' : '')" data-typeindex="-1" @tap="chooseroomnumpop">不限</view> -->
						<view :class="'typeitem ' + (room_num_index == index ? 'active' : '')" :data-typeindex="index"
							@tap="chooseroomnumpop" v-for="(item, index) in roomnumData" :key="index">
							{{ item.name }}
						</view>
					</view>
					<view class="fs28 black mb35">您的购房预算</view>
					<view class="fs32	col-normal tc mb30">
						{{ value == 1000 ? '无限' : value }}{{ value == 1000 ? '' : '万' }}
					</view>
					<slider @change="sliderchange" @changing="sliderchange" block-size="15" block-color="#0091ff"
						backgroundColor="#f6f7fa" activeColor="#0091ff" class="slider" min="0" max="500" />
					<view class="flex-box flex-between">
						<view class="fs30">0</view>
						<view class="fs30">无限</view>
					</view>
				</view>
				<view class="foot flex-box flex-between m-hairline--top">
					<button class="btn1" @tap="clearOrtherPop">清空</button>
					<button @tap="confirmOrtherPop" class="btn2">确定</button>
				</view>
			</view>
		</u-popup>

		<view v-if="is_show_count_down" class="counttime_box">
			<image src="/static/icon/icon_counttime.png" class="icon_counttime"></image>
			<view class="times">
				{{ countDownNum }}
				<text>s</text>
			</view>
		</view>
	</view>
</template>

<script>
	const app = getApp();

	const functions = require('../../../utils/functions.js');
	export default {
		data() {
			return {
				webUrl: app.globalData.web_url,
				loadStatus: 'loadmore', //加载状态
				is_ajax_list: false,
				btnStatus: false, //提交数据拦截重复提交

				autoplayStatus: true,

				firstpop: false, //广告弹窗
				popupStatus: false, //预约弹窗
				consults:'',
				//订阅咨询预约弹窗
				reserveStatus: false,
				// 预约订阅类型，分类:1=订阅动态,2=留电咨询,3=领取免费专车,4=帮你找房,5=咨询房价走势
				appoint_type: 1,
				// 订阅分类，订阅通知类型:0=无订阅,1=订阅变价通知,2=订阅开盘通知,3=订阅实时动态
				appoint_subscribe_type: 0,
				// 预约手机号
				appoint_mobile: '',
				appoint_mobile_text: '',
				broker_user_id: 0,

				// 当前城市
				now_city: '锡林郭勒盟',

				// 首页悬浮广告
				advert_data1: [],

				advert_data1_index: 0,

				// 首页顶部轮播图
				advert_data2: [],

				advert_data2_index: 0,

				// 首页中间轮播图
				advert_data3: [],

				advert_data3_index: 0,

				// 首页展示标签
				indexShowData: [],

				// 城市房价
				cityHousePriceData: {
					now_average_price: '',
					now_trade_num: '',
					average_price_sub: 0,
					average_price_percent: 0,
					trade_num_sub: 0,
					trade_num_percent: 0
				},

				chat_log_data: [],

				// 上下轮播资讯（classify=1），买房问问（classify=2），动态（classify=3）数据
				informationData: [],

				// 首页热门楼盘-新房
				hotHouseData: [],

				// 首页推荐咨询师
				brokerData: [],

				// 房源列表
				houseList: {
					total: 0,
					current_page: 0,
					last_page: 1,
					data: []
				},

				//选择区域弹窗
				areapop: false,
				areaData: [],

				//选择户型弹窗
				roomnumData: [],
				ortherpop: false,
				now_show_region_index: -1,
				is_left_none: true,
				is_right_none: true,
				value: 0,
				//购房预算
				room_num_index: -1,

				//默认不限户型
				orther_areas: '',

				house_search_roomnum_ids: '',
				min_total_price: 0,
				max_total_price: -1,
				total_price_text: '',
				layout_text: '',
				is_checkbox: false,

				bgColor: 'transparent',

				is_show_count_down: false,
				countDownNum: 120,
			};
		},
		onLoad: function(options) {
			this.statusHeight = uni.getSystemInfoSync().statusBarHeight;
			// 扫小程序码获得数据
			var that = this;
			functions.handlePid('', options);

			this.getHouseList();
			this.now_city = uni.getStorageSync('now_city') || '锡林郭勒盟';
			this.getLocationLatLng(function() {
				that.initData();
			});
		},
		onShow: function() {
			var now_city = uni.getStorageSync('now_city') || '锡林郭勒盟';
			// 修改了城市
			if (now_city != this.now_city) {
				this.now_city = now_city;
				this.initData();
			}
			var that = this;
			uni.$on('countDownCb', function(countDownNum) {
				that.countDown(countDownNum);
			});
			app.setMessageBadge(false)
		},
		onPullDownRefresh: function() {
			uni.showNavigationBarLoading(); //在标题栏中显示加载
			var that = this;
			//模拟加载
			setTimeout(function() {
				that.initData();
				uni.stopPullDownRefresh(); //停止下拉刷新
			}, 1500);
		},
		onReachBottom: function() {
			if (this.houseList.current_page >= this.houseList.last_page) {
				this.loadStatus = 'nomore';
				return false;
			} else {
				this.getHouseList();
			}
		},
		onShareAppMessage: function(res) {},
		methods: {
			countDown: function(countDownNum) {
				this.is_show_count_down = countDownNum > 0 ? true : false
				this.countDownNum = countDownNum
			},
			//客服
			handleContact (e) {
			  console.log(e.detail.path)
			  console.log(e.detail.query)
			},
			// 跳转页面
			jumpToPages(event) {
				var that = this;
				var jump_type = Number(event.currentTarget.dataset.jump_type);
				var url = event.currentTarget.dataset.url;

				if (jump_type == 1) {
					uni.navigateTo({
						url: url
					});
				} else if (jump_type == 2) {
					app.globalData.nowThat = this;
					functions.checkLogin(function(ret) {
						if (ret) {
							uni.navigateTo({
								url: url
							});
						} else {
							functions.toast('请先登录');
						}
					});
				} else if (jump_type == 3) {
					var tel = app.globalData.config.platform_contact_tel;
					functions.phoneCall({
						phoneNumber: tel //仅为示例，并非真实的电话号码
					});
				}
			},
			// 跳转页面 type=1(跳转有tabBar底部的页面)，type=2(正常跳转)
			jumpPages(event) {
				var type = Number(event.currentTarget.dataset.type);
				var url = event.currentTarget.dataset.url;

				if (type == 1) {
					functions.jumpPages(url);
				} else {
					uni.navigateTo({
						url: url
					});
				}
			},
			// 广告的跳转
			jumpAdvertTo(event) {
				var that = this;
				var param = event.currentTarget.dataset.param;
				console.log(param)
				if (param.goto_type == 1) {
					return false;
				}
				// $goto_type  - 跳转方式:1=不跳转,2=跳转外链,3=跳转内链,4=我要订阅

				if (param.goto_type == 4) {
					// 我要订阅
					// 处理手机号码
					var appoint_mobile = uni.getStorageSync('mobile') || that.appoint_mobile;
					this.broker_user_id = 0;
					this.appoint_mobile = appoint_mobile;
					this.popupStatus = false;
					this.appoint_type = 1;
					this.appoint_subscribe_type = 3;
					that.submitAppointLog();
				} else if (param.goto_type == 2) {
					uni.navigateTo({
						url: '/pages/webview/webview?url=' + param.goto_url
					});
				} else if (param.goto_type == 5) {
					uni.navigateTo({
						url: '/pages/webview/webview?url=' + param.goto_url
					});
				} else if (param.goto_type == 3) {
					var redirectArr = [
						'/pages/index/index', //首页
						'/pages/building_list/building_list',//楼盘列表
						'/pages/information/information', //资讯
						'/pages/personal/personal',//个人中心
					];

					if (param.insidepages.is_need_login == 2) {
						app.globalData.nowThat = that;
						functions.checkLogin(function(ret) {
							if (ret) {
								if (redirectArr.indexOf(param.insidepages.wxmini_url) == -1) {
									if (param.insidepages.is_need_param == 2) {
										uni.navigateTo({
											url: param.insidepages.wxmini_url + '?id=' + param.goto_param
										});
									} else {
										uni.navigateTo({
											url: param.insidepages.wxmini_url
										});
									}
								} else {
									uni.switchTab({
										url: param.insidepages.wxmini_url
									});
								}
							} else {
								functions.toast('请先登录');
							}
						});
					} else {
						if (redirectArr.indexOf(param.insidepages.wxmini_url) == -1) {
							if (param.insidepages.is_need_param == 2) {
								console.log(param.insidepages.wxmini_url + '?id=' + param.goto_param)
								uni.navigateTo({
									url: param.insidepages.wxmini_url + '?id=' + param.goto_param
								});
							} else {
								uni.navigateTo({
									url: param.insidepages.wxmini_url
								});
							}
						} else {
							uni.switchTab({
								url: param.insidepages.wxmini_url
							});
						}
					}
				}
			},
			//推荐房源 新房，二手房跳转
			goToDe(event){
				console.log(event);
				console.log('详情id:'+event.id);
				console.log('新房:'+event.house_type_id);
				
				if (event.house_type_id==16) {
					//新房 = 16
					uni.navigateTo({
						url: '/pages/house/building_detail_news/building_detail_news?id='+event.id
					});
				}else if(event.house_type_id==1) {
					// 二手房 = 1
					uni.navigateTo({
						url: '/pages/house/building_detail/building_detail?id='+event.id
					});
				}else{
					// 其他
					uni.navigateTo({
						url: '/pages/house/building_detail/building_detail?id='+event.id
					});
				}
				
			},
			// 选择地图找房还是提交
			checkboxChange(e) {
				this.is_checkbox = !this.is_checkbox
			},
			// 清空选择户型和价格
			clearOrtherPop() {
				this.value = 0;
				this.room_num_index = -1;
				this.confirmOrtherPop();
			},
			// 确定选择户型和价格
			confirmOrtherPop() {
				var nowjson = this.room_num_index == -1 ? {} : this.roomnumData[this.room_num_index];
				var house_search_roomnum_ids = this.room_num_index == -1 ? '' : this.roomnumData[this.room_num_index].id;
				var total_price_text = this.value == 1000 ? '' : '0-' + this.value + '万';
				this.ortherpop = false;
				this.total_price_text = total_price_text;
				this.max_total_price = this.value == 1000 ? -1 : this.value;
				this.layout_text = this.room_num_index == -1 ? '' : nowjson.name;
				this.house_search_roomnum_ids = house_search_roomnum_ids;
			},
			// 选择价格
			sliderchange(e) {
				this.value = e.detail.value;
			},
			// 选择户型
			chooseroomnumpop(e) {
				this.room_num_index = e.currentTarget.dataset.typeindex;
			},
			// 选择区域
			open_area_pop() {
				this.areapop = !this.areapop
			},
			// 选择户型和价格
			open_orther_pop() {
				this.ortherpop = !this.ortherpop
			},
			chooseLeft(e) {
				var index = e.currentTarget.dataset.index;
				var areaData = this.areaData;

				if (index == -1) {
					this.clearLeftRight();
					return false;
				}

				var is_right_none = true;

				if (index != -1) {
					var right_street_data = areaData[index].list;

					for (let index = 0; index < right_street_data.length; index++) {
						const element = right_street_data[index];

						if (element.is_choose) {
							is_right_none = false;
						}
					}

					if (is_right_none) {
						areaData[index].is_choose = !areaData[index].is_choose;
					}
				}

				var is_left_none = true;

				for (let index = 0; index < areaData.length; index++) {
					const element = areaData[index];

					if (element.is_choose) {
						is_left_none = false;
					}
				}

				this.is_left_none = is_left_none;
				this.is_right_none = is_right_none;
				this.areaData = areaData;
				this.now_show_region_index = index;
			},

			chooseRight(e) {
				var now_index = e.currentTarget.dataset.index;
				var now_show_region_index = this.now_show_region_index;

				if (now_show_region_index == -1) {
					return false;
				}

				var areaData = this.areaData;
				const rightData = areaData[now_show_region_index].list;

				if (now_index == -1) {
					for (let index = 0; index < rightData.length; index++) {
						rightData[index].is_choose = false;
					}

					areaData[now_show_region_index].list = rightData;
					this.is_right_none = true;
					this.areaData = areaData;
					return false;
				}

				rightData[now_index].is_choose = !rightData[now_index].is_choose;
				var is_right_none = true;

				for (let index = 0; index < rightData.length; index++) {
					const element = rightData[index];

					if (element.is_choose) {
						is_right_none = false;
					}
				}

				if (!is_right_none) {
					areaData[now_show_region_index].is_choose = true;
				}

				areaData[now_show_region_index].list = rightData;
				this.is_right_none = is_right_none;
				this.areaData = areaData;
			},
			clearLeftRight() {
				var areaData = this.areaData;

				for (let index = 0; index < areaData.length; index++) {
					areaData[index].is_choose = false;
					const rightData = areaData[index].list;

					for (let j = 0; j < rightData.length; j++) {
						rightData[j].is_choose = false;
					}
				}

				this.is_left_none = true;
				this.is_right_none = true;
				this.areaData = areaData;
				this.confirmLeftRight();
			},

			confirmLeftRight() {
				// orther_areas
				var areaData = this.areaData;
				var temp_arr = [];

				for (let index = 0; index < areaData.length; index++) {
					var temp_arr2 = [];
					const rightData = areaData[index].list;

					for (let j = 0; j < rightData.length; j++) {
						if (rightData[j].is_choose) {
							temp_arr2.push(rightData[j].name);
						}
					}

					if (temp_arr2.length > 0) {
						var temp_str2 = temp_arr2.join('/');

						if (areaData[index].is_choose) {
							temp_arr.push(areaData[index].name + '(' + temp_str2 + ')');
						}
					} else {
						if (areaData[index].is_choose) {
							temp_arr.push(areaData[index].name);
						}
					}
				}

				if (temp_arr.length > 0) {
					this.orther_areas = temp_arr.join('、');
				} else {
					this.orther_areas = '';
				}

				this.areapop = false;
			},

			// 拨打电话
			bindPhoneCall(e) {
				var tel = app.globalData.config.platform_contact_tel;
				functions.phoneCall({
					phoneNumber: tel //仅为示例，并非真实的电话号码
				});
			},
			jumpToChat(e) {
				var uid = e.currentTarget.dataset.uid || 0;
				var that = this;
				functions.checkLogin(function(ret) {
					if (ret) {
						functions.jumpToChat(uid);
					} else {
						functions.toast('请先登录');
					}
				});
			},
			// 添加预约记录
			addAppointLog(e) {
				this.appoint_type = e.currentTarget.dataset.type;
				this.appoint_subscribe_type = e.currentTarget.dataset.subtype;
				this.broker_user_id = e.currentTarget.dataset.uid || 0;
				// 处理手机号码
				this.appoint_mobile = uni.getStorageSync('mobile') || this.appoint_mobile;
				this.popupStatus = true;
			},

			appoint_mobileFun(e) {
				this.appoint_mobile = e.detail.value
			},
			// 提交预约日志
			submitAppointLog() {
				var that = this;
				if (that.appoint_mobile.length != 11) {
					functions.toast('请输入正确的手机号');
					return false;
				}
				functions.checkLogin(function(ret) {
					if (ret) {
						var appoint_mobile = uni.getStorageSync('mobile');
						that.appoint_mobile = appoint_mobile;

						functions.submitAjaxData(
							that,
							'/api/xiluhouse/house/create_appoint_log', {
								type: that.appoint_type,
								subscribe_type: that.appoint_subscribe_type,
								mobile: that.appoint_mobile,
								broker_user_id: that.broker_user_id,
								city: that.now_city,
								orther_areas: that.orther_areas,
								house_search_roomnum_ids: that.house_search_roomnum_ids,
								min_total_price: that.min_total_price,
								max_total_price: that.max_total_price
							},
							function(res) {
								that.appoint_mobile = that.appoint_mobile;
								that.appoint_mobile_text = appoint_mobile.substr(0, 3) + '****' +
									appoint_mobile.substr(7);
								that.reserveStatus = true;
								that.popupStatus = false;
							}
						);
					} else {
						functions.toast('请先登录');
					}
				});
			},
			closePopupStatus() {
				this.popupStatus = false;
			},
			closeReserveStatus() {
				this.reserveStatus = false;
			},
			swiperChange1: function(e) {
				this.advert_data1_index = e.detail.current;
			},

			swiperChange2: function(e) {
				this.advert_data2_index = e.detail.current;
			},

			swiperChange3: function(e) {
				this.advert_data3_index = e.detail.current;
			},
			//广告弹窗
			closeadv() {
				this.firstpop = false;
			},

			// 获取房源列表信息
			getHouseList: function() {
				var that = this;
				var json = {
					city: that.now_city,
					lat: uni.getStorageSync('now_lat'),
					lng: uni.getStorageSync('now_lng'),
					sort: 1 ,//排序:1=默认排序，2=看房次数从大到小（人气排行榜），3=单价从小到大，4=单价从大到小，5=成交量从大到小(热销排行榜)
					tag_ids:37,//人气好房，房屋标签
				};
				json.page = Number(that.houseList.current_page) + 1;

				if (json.page > 1 && that.houseList.current_page >= that.houseList.last_page) {
					functions.toast('已加载到底部了');
					this.loadStatus = 'nomore';
					return false;
				} // 其他搜索条件
				// 。。。
				this.loadStatus = 'loading';
				functions.getAjaxList(that, '/api/xiluhouse/House/house_list', json, function(res) {
					console.log('aaa'+res.data)
					var houseList = res.data;
					if (json.page > 1) {
						var now_houseList_data = that.houseList.data || [];
						var now_houseList_data = now_houseList_data.concat(houseList.data);
						houseList.data = now_houseList_data;
					}
					that.houseList = houseList;
				});
				
			},

			// 定位获取当前城市
			getLocationLatLng: function(cb) {
				var that = this;
				app.globalData.getLocation(function(ret) {
					console.log(ret)
					if (ret) {
						// 根据经纬度获取当前城市
						functions.getAjaxData(
							'/api/xiluhouse/universal/get_city_from_lng_lat', {
								lat: ret.latitude,
								lng: ret.longitude
							},
							function(res) {
								uni.setStorageSync('locate_city', res.data);

								if (res.data != that.now_city) {
									uni.showModal({
										title: '提示',
										content: '当前定位城市为' + res.data + ',是否切换城市？',
										cancelText: '不切换',
										confirmText: '切换',

										success(res) {
											if (res.confirm) {
												that.now_city = res.data;
												uni.setStorageSync('now_city', res.data);
												uni.setStorageSync('now_lat', ret.latitude);
												uni.setStorageSync('now_lng', ret.longitude);
												cb();
											} else if (res.cancel) {
												cb();
											}
										}
									});
								}
							}
						);
					}
				});
				cb();
			},

			// 获取所有可下拉刷新更新的数据
			initData: function() {
				var that = this;
				// 获取---通用类-广告图
				functions.getAjaxData(
					'/api/xiluhouse/universal/advert_data', {
						position_type: 2 
					},
					function(res) {
						var data1 = []; // 判断首页悬浮窗的显示
						console.log(res.data);
						that.consults = res.data.consult;
						if (res.data.data1.length > 0) {
							var cun_datetime = uni.getStorageSync('cun_datetime') ? uni.getStorageSync(
								'cun_datetime') : 0; // 当日零点的时间戳

							var now_datetime = new Date(new Date().toLocaleDateString()).getTime();

							if (cun_datetime < now_datetime) {
								data1 = res.data.data1;
								uni.setStorageSync('cun_datetime', now_datetime);
							}
						}
						that.firstpop = (data1.length > 0) ? true : false
						that.advert_data1 = data1;
						that.advert_data2 = res.data.data2;
						that.advert_data3 = res.data.data3;
					}
				);
				// 获取---通用类-城市下区县、街道
				functions.getAjaxData('/api/xiluhouse/universal/region_street_data', {
					'city': that.now_city,
				}, function(res) {
					that.areaData = res.data;
				})
				// 获取---通用类-房源类型搜索数据
				functions.getAjaxData('/api/xiluhouse/universal/search_field_data', {
					'city': that.now_city,
				}, function(res) {
					// 处理户型
					that.roomnumData = res.data.roomnumData;
				})
				// 获取---通用类-小程序首页数据
				functions.getAjaxData(
					'/api/xiluhouse/universal/mini_index_data', {
						city: that.now_city
					},
					function(res) {
						that.indexShowData = res.data.indexShowData;
						that.cityHousePriceData = res.data.cityHousePriceData;
						that.informationData = res.data.informationData;
						// that.hotHouseData = res.data.hotHouseData;
						that.brokerData = res.data.brokerData;
						that.chat_log_data = res.data.chat_log_data;
					}
				);
				
				
				// 获取---热销楼盘-新房

				var json = {
					city: that.now_city,
					lat: uni.getStorageSync('now_lat'),
					lng: uni.getStorageSync('now_lng'),
					type_ids:16,//新房
					page: 1,
					sort: 1 ,//排序:1=默认排序，2=看房次数从大到小（人气排行榜），3=单价从小到大，4=单价从大到小，5=成交量从大到小(热销排行榜)
					tag_ids:37,
				};
				functions.getAjaxList(that, '/api/xiluhouse/House/house_list', json, function(res) {
					console.log(res.data);
					var houseList = res.data;
					that.hotHouseData = houseList.data;
					console.log(that.hotHouseData)
				});
				
				
				this.advert_data1_index = 0;
				this.advert_data2_index = 0;
				this.advert_data3_index = 0;
				this.houseList.current_page = 0;
				// 获取该城市的房源列表
				that.getHouseList();
			},


		},
		// 监听页面滚动
		onPageScroll(e) {
			if (e.scrollTop >= 10) {
				this.bgColor = '#1298FD';
			} else {
				this.bgColor = 'transparent';
			}
		}
	};
</script>
<style scoped lang="scss">
	.adv_swiper {
		height: 200rpx;
		margin-bottom: 45rpx;
	}

	.counttime_box {
		width: 115rpx;
		height: 114rpx;
		position: fixed;
		right: 20rpx;
		bottom: 340rpx;
		z-index: 5;
	}

	.icon_counttime {
		width: 115rpx;
		height: 114rpx;
		position: absolute;
		top: 0;
		left: 0;
		z-index: 10;
	}

	.counttime_box .times {
		font-size: 38rpx;
		color: #734b13;
		position: absolute;
		top: 26rpx;
		left: 0;
		z-index: 11;
		width: 100%;
		text-align: center;
	}

	.notice_swiper {
		width: 670rpx;
		margin: 0 auto 30rpx;
		background: #f6f7fa;
		border-radius: 29rpx;
		height: 60rpx;
	}

	.notice_box2 {
		padding: 0 22rpx;
		height: 60rpx;
	}

	.notice_box {
		padding: 22rpx 40rpx 0;
	}

	.icon_notice {
		width: 30rpx;
		height: 30rpx;
		margin-right: 15rpx;
	}

	.df {
		display: flex;
		display: -webkit-flex;
	}

	.ac {
		align-items: center;
	}

	.js {
		justify-content: space-between;
	}

	.can_consult {
		width: 94rpx;
		height: 36rpx;
		background: rgba(0, 0, 0, 0.4);
		border-radius: 10rpx 0 10rpx 0;
		position: absolute;
		top: 0;
		left: 0;
		z-index: 3;
	}

	.can_consult::before {
		content: '';
		display: block;
		width: 10rpx;
		height: 10rpx;
		background-color: var(--green);
		border-radius: 50rpx;
		margin-right: 5rpx;
	}

	.areas {
		z-index: 2;
		width: 100vw;
	}

	.swiper {
		width: 100%;
		height: 654rpx;
		position: relative;
		z-index: 1;

		.titles {
			position: absolute;
			top: 227rpx;
			left: 55rpx;
			z-index: 2;
		}

		.btn {
			width: 130rpx;
			height: 50rpx;
			border-radius: 25rpx;
			border: 1px solid #ffffff;
			display: flex;
			align-items: center;
			justify-content: center;
		}
	}

	.swiper .index_bg {
		position: relative;
		z-index: 1;
		width: 100%;
	}

	.swiper-dots {
		position: absolute;
		bottom: 200rpx;
		width: 100%;
		z-index: 2;
	}

	.swiper-dots .swiper-dot {
		width: 8rpx;
		height: 8rpx;
		background: rgba(255, 255, 255, 0.6);
		border-radius: 50px;
		margin: 0 3rpx;
	}

	.swiper-dots .swiper-dot.active {
		width: 12rpx;
		background: rgba(255, 255, 255, 1);
	}

	.swiper-box {
		position: relative;
		height: 654rpx;
	}

	.city-picker {
		width: 150rpx;
		height: 70rpx;
		border-radius: 50rpx;
		font-size: var(--fs24);
	}

	.city-picker::after {
		width: 0;
		content: '';
		display: block;
		margin-top: 4rpx;
		margin-left: 15rpx;
		height: 0;
		border-top: 8rpx solid var(--white);
		border-right: 7.5rpx solid transparent;
		border-bottom: 8rpx solid transparent;
		border-left: 7.5rpx solid transparent;
	}

	.inputbox {
		width: 500rpx;
		height: 70rpx;
		border-radius: 50rpx;
		background-color: rgba(255, 255, 255, 0.3);
		color: var(--white);
		margin-left: 20rpx;
		padding: 0 30rpx;
	}

	.icon_search {
		width: 30rpx;
		height: 30rpx;
		margin-right: 20rpx;
	}

	.inputbox input {
		color: var(--white);
		font-size: var(--fs24);
	}

	.choosebox {
		position: relative;
		z-index: 3;
		background: var(--white);
		border-radius: 20rpx;
		background: #ffffff;
		padding: 20rpx 30rpx 30rpx;
		box-shadow: 0 4rpx 20rpx rgba(183, 189, 202, 0.2);
		margin: -180rpx 40rpx 0;
	}

	.choosearea {
		height: 92rpx;
		line-height: 92rpx;
		border-bottom: 1px solid #f4f3f3;
		padding: 0 30rpx;
		font-size: var(--fs30);
		color: #101010;
	}

	.checkbox {
		font-size: var(--fs24);
	}

	.mapsearch {
		width: 100%;
		text-align: center;
		line-height: 80rpx;
		font-size: var(--fs30);
		color: var(--white);
		font-weight: 400;
		height: 80rpx;
		border-radius: 40rpx;
		background: var(--normal);
		box-shadow: 0 2rpx 20rpx rgba(3, 103, 179, 0.3);
		margin-bottom: 15rpx;
	}

	.icon_car {
		width: 23rpx;
		height: 21rpx;
		margin-right: 6rpx;
	}

	.icon_city {
		width: 23rpx;
		height: 23rpx;
		margin-right: 6rpx;
	}

	.icon_save {
		width: 19rpx;
		height: 21rpx;
		margin-right: 6rpx;
	}
	.tips {
		font-size: var(--fs24);
		color: #898989;
	}

	.navbox {
		padding:20rpx 40rpx;
		flex-wrap: wrap;
		font-size: 30rpx;
		color: #101010;
		text-align: center;
		background:#fff;
		overflow:hidden;
		margin-top:10rpx;
		position:relative;
		z-index:3;
	}

	.navbox image {
		width: 120rpx;
		height:123rpx;
		display: block;
		margin: 0 auto 20rpx;
	}

	.navbox .navitem {
		width: 25%;
		margin-bottom: 20rpx;
	}

	.img_event {
		width: 671rpx;
		height: 129rpx;
		display: block;
		margin: 0 auto;
	}

	.title {
		background: linear - gradient(to bottom, rgb(255,237,201), rgb(255,246,229));
		border-radius:10rpx;
		padding:20rpx 40rpx 33rpx;
		font-size: 34rpx;
		color: #101010;
		overflow:hidden;
		.tips{
			font-size:24rpx;
			line-height:36rpx;
			color:#999;
		}
	}
	
	.new_title{
		width:100%;
		flex-shrink:1;
		color:#f00;
		font-size: 34rpx;
		box-sizing:border-box;
		padding-left:80rpx;
		position:relative;
		text-align:center;
	}

	.title .navigator {
		width:80rpx;
		text-align:right;
		flex-shrink:1;
		box-sizing:border-box;
		font-size: var(--fs24);
		color: #898989;
		height: 46rpx;
		line-height: 46rpx;
	}

	.houseprice {
		margin: 0 40rpx 50rpx;
		padding: 0 30rpx 30rpx;
		border-radius: 15px;
		background: #ffffff;
		box-shadow: 0px 4px 30px rgba(184, 189, 202, 0.3);
		position: relative;
	}

	.houseprice .priceitem {
		padding: 30rpx 0;
		flex: 1;
		color: #101010;
	}

	.houseprice .priceitems {
		border-bottom: 1px solid #f4f3f3;
		position: relative;
		z-index: 2;
		margin-bottom: 30rpx;
	}

	.houseprice .line {
		width: 1px;
		height: 40rpx;
		background-color: #f4f3f3;
		display: block;
	}

	.houseprice .price {
		font-size: 34rpx;
		padding-bottom: 3rpx;
		line-height: 45rpx;
	}

	.houseprice .price text {
		font-size: var(--fs24);
		color: #898989;
	}

	.houseprice .updown {
		font-size: 20rpx;
		color: #898989;
	}

	.houseprice .updown .up {
		width: 0;
		height: 0;
		border-top: 0 solid transparent;
		border-right: 7.5rpx solid transparent;
		border-bottom: 8rpx solid red;
		border-left: 7.5rpx solid transparent;
	}

	.houseprice .updown .down {
		width: 0;
		height: 0;
		border-top: 8rpx solid #56dd7a;
		border-right: 7.5rpx solid transparent;
		border-bottom: 0 solid transparent;
		border-left: 7.5rpx solid transparent;
	}

	.houseprice .icon_data {
		width: 142rpx;
		height: 127rpx;
		position: absolute;
		right: 30rpx;
		top: 30rpx;
		z-index: 1;
	}

	.houseprice .news {
		padding-bottom: 14rpx;
	}

	.houseprice .news .newscon {
		font-size: var(--fs24);
	}

	.consultprice {
		border-radius: 50px;
		line-height: 80rpx;
		color: var(--normal);
		border: 1px solid var(--normal);
		margin-top: 20rpx;
		display: flex;
		align-items: center;
		justify-content: center;
		font-weight: bold;
	}

	.hothouse {
		white-space: nowrap;
		overflow-x: scroll;
		padding-bottom: 50rpx;
		width: 100%;
	}

	.hotbox {
		width: 265rpx;
		border-radius: 10rpx;
		border: solid 1px #eeeeee;
		margin-right: 20rpx;
		display: inline-block;
		background: #ffffff;
		overflow: hidden;
		position: relative;
	}

	.hotbox:first-child {
		margin-left: 40rpx;
	}

	.hotbox .houseimg {
		width: 265rpx;
		height: 148rpx;
	}

	.hotbox .housename {
		padding: 10rpx 20rpx 3rpx;
		line-height: 40rpx;
		font-size: var(--fs30);
	}

	.hotbox .housesize {
		padding: 0 20rpx;
		line-height: 40rpx;
		color: #898989;
		font-size: var(--fs30);
	}

	.hotbox .housepri {
		padding: 0 20rpx 10rpx;
		line-height: 40rpx;
		font-weight:bold;
		font-size: var(--fs30);
		color: var(--red);
	}

	.hotbox .housearea {
		padding: 3rpx 7rpx;
		line-height: 25rpx;
		font-size: var(--fs18);
		color: var(--white);
		background: rgba(0, 0, 0, 0.4);
		border-radius: 2rpx;
		position: absolute;
		top: 108rpx;
		right: 10rpx;
		z-index: 2;
	}

	.hotbox .righttop {
		width: 110rpx;
		line-height: 28rpx;
		background: #fe973d;
		border-radius: 10rpx 0 10rpx 0;
		color: var(--white);
		font-size: var(--fs18);
		position: absolute;
		top: 0;
		left: 0;
		padding: 0 6rpx;
		z-index: 3;
	}

	.consultants {
		padding: 0 40rpx 50rpx;
	}

	.consultant {
		width: 325rpx;
		border: solid 1px #eeeeee;
		background: #ffffff;
		border-radius: 10px;
		margin-bottom: 20rpx;
		position: relative;
		overflow: hidden;
	}

	.consultant .img_consultant {
		width: 100%;
		height: 190rpx;
	}

	.consultant .consultname {
		font-size: var(--fs34);
		padding: 10rpx 20rpx 0;
		line-height: 45rpx;
	}

	.consultant .consultname text {
		font-size: var(--fs24);
		color: #898989;
	}

	.consultant .targetbox {
		white-space: nowrap;
		width: 100%;
		padding: 0 20rpx;
		overflow-x: scroll;
		height: 30rpx;
	}

	.consultant .targetbox view {
		padding: 0 3rpx;
		height: 30rpx;
		line-height: 30rpx;
		border-radius: 4rpx;
		display: inline-block;
		color: #898989;
		font-size: var(--fs20);
		background: #f6f7fa;
		margin-right: 20rpx;
	}

	.consultant .alconsult {
		font-size: var(--fs24);
		line-height: 34rpx;
		padding: 10rpx 20rpx;
	}

	.consultant .consult {
		border-radius: 50px;
		text-align: center;
		line-height: 55rpx;
		height: 55rpx;
		color: var(--normal);
		border: 1px solid var(--normal);
		margin: 0 20rpx 18rpx;
	}

	.sortbox {
		position: sticky;
		height: 90rpx;
		line-height: 90rpx;
		border-bottom: 1px solid #f4f3f3;
		padding: 0 40rpx;
		top: calc(var(--status-bar-height) + 88upx);
		background-color: var(--white);
		z-index: 9999999;
	}

	.sortbox .sortitem {
		flex: 1;
		align-items: center;
		justify-content: center;
		display: flex;
	}

	.sortbox .sortitem::after {
		width: 0;
		content: '';
		display: block;
		height: 0;
		margin-left: 14rpx;
		border-top: 8rpx solid #ccc;
		border-right: 7.5rpx solid transparent;
		border-bottom: 0 solid transparent;
		border-left: 7.5rpx solid transparent;
	}

	.sortbox .sortitem.active::after {
		width: 0;
		content: '';
		display: block;
		height: 0;
		margin-left: 14rpx;
		border-top: 0 solid transparent;
		border-right: 7.5rpx solid transparent;
		border-bottom: 8rpx solid var(--normal);
		border-left: 7.5rpx solid transparent;
	}

	.typelist {
		white-space: nowrap;
		overflow-x: scroll;
		width: 100%;
		padding: 30rpx 0;
	}

	.typelist view {
		padding: 10rpx 25rpx;
		border-radius: 5px;
		background: #f6f7fa;
		color: #898989;
		display: inline-block;
		margin-right: 20rpx;
	}

	.typelist view.active {
		background-color: var(--normal);
		color: var(--white);
	}

	.typelist view:first-child {
		margin-left: 40rpx;
	}

	.houselist {
		padding: 30rpx 40rpx 0;
		margin-top: -20rpx;
		position: relative;
		z-index: 9;
		background: #fff;
	}

	.houselist .houseitem {
		position: relative;
		padding-bottom: 30rpx;

		.targets {
			position: absolute;
			top: 15rpx;
			left: 15rpx;
			z-index:9;
		}

		.targets view {
			padding: 2rpx 4rpx;
			color: var(--white);
			font-size: var(--fs16);
			margin-right: 10rpx;
			border-radius: 2rpx;
		}

		.targets .tar1 {
			background-color: #ff7b40;
		}

		.targets .tar2 {
			background-color: #fe6075;
		}

		.targets .tar3 {
			background-color: var(--blue);
		}
	}

	.houselist .houseitem .houseimg {
		width: 240rpx;
		height: 190rpx;
		border-radius: 10rpx;
		margin-right: 20rpx;
	}

	.houselist .housename {
		font-size: var(--fs30);
		padding-bottom: 10rpx;
	}

	.houselist .area-size {
		font-size: var(--fs24);
		color: #898989;
	}

	.houselist .targetbox {
		padding: 14rpx 0 0;
		white-space: nowrap;
		overflow-x: scroll;
		width: 100%;
	}

	.houselist .targetitem {
		padding: 2rpx 4rpx;
		background: #cce9ff;
		font-size: var(--fs18);
		color: var(--normal);
		border-radius: 2rpx;
		margin-right: 10rpx;
		margin-bottom: 12rpx;
	}

	.houselist .housecost {
		color: var(--red);
		font-size: var(--fs24);
	}

	.houselist .housecost text {
		font-size: var(--fs34);
	}
	.houselist .housecost .junjia{
		font-size: var(--fs24);
		color: #999;
	}

	.houselist .event {
		padding-top: 11rpx;
		font-size: var(--fs18);
		color: #898989;
	}

	.houselist .event .bao {
		width: 26rpx;
		text-align: center;
		line-height: 26rpx;
		font-size: var(--fs18);
		height: 26rpx;
		border-radius: 5rpx;
		background: linear-gradient(180deg, #00c4ff, var(--normal));
		color: var(--white);
		margin-right: 10rpx;
	}

	.houselist .event .dong {
		width: 26rpx;
		text-align: center;
		line-height: 26rpx;
		font-size: var(--fs18);
		height: 26rpx;
		border-radius: 5rpx;
		background: linear-gradient(270deg, #ff6635, #ffb45c);
		color: var(--white);
		margin-right: 10rpx;
	}

	.popup-wrap {
		width: auto;
	}

	.firstpop .banner {
		width: 600rpx;
		height: 700rpx;
	}

	.main-class {
		background-color: transparent;
	}

	.popup-wrap.custom-class {
		background-color: transparent;
	}

	.sortbox .sortitem.active {
		color: var(--normal);
	}

	.icon_reward {
		width: 16rpx;
		height: 16rpx;
		margin-right: 5rpx;
	}

	.number_one {
		height: 30rpx;
		display: flex;
		align-items: center;
		justify-content: center;
		background: #fe973c;
		border-radius: 5rpx;
		padding: 0 5rpx;
		font-size: 16rpx;
		color: #fff;
		margin-bottom: 12rpx;
		margin-right: 10rpx;
	}

	.container {
		overflow: visible;
	}

	.huxing-pop {
		position: relative;
	}

	.huxing-pop .head {
		padding: 50rpx 40rpx 10rpx;
	}

	.huxing-pop .body {
		padding: 30rpx 40rpx 25rpx;
		max-height: 550rpx;
		background: #ffffff;
		overflow-y: scroll;
	}

	.huxing-pop .typebox .typeitem {
		width: 205rpx;
		height: 75rpx;
		text-align: center;
		line-height: 75rpx;
		border-radius: 5rpx;
		background: #f6f7fa;
		font-size: 28rpx;
		margin-right: 25rpx;
		margin-bottom: 25rpx;
	}

	.huxing-pop .typebox .typeitem:nth-of-type(3n) {
		margin-right: 0;
	}

	.huxing-pop .typebox .typeitem.active {
		background: rgba(0, 145, 255, 0.1);
	}

	.huxing-pop .slider {
		margin: 0 10rpx 10rpx;
	}

	.huxing-pop .foot {
		padding: 25rpx 40rpx;
	}

	.huxing-pop .btn1 {
		width: 320rpx;
		height: 80rpx;
		border-radius: 8rpx;
		border: 1rpx solid #cccccc;
		font-size: 30rpx;
		font-weight: 500;
		color: #898989;
		line-height: 80rpx;
		text-align: center;
	}

	.huxing-pop .btn2 {
		width: 320rpx;
		height: 80rpx;
		border-radius: 8rpx;
		background: var(--normal);
		box-shadow: 0 4rpx 40rpx 0 rgba(3, 103, 179, 0.3);
		font-size: 30rpx;
		font-weight: 500;
		color: #ffffff;
		line-height: 80rpx;
		text-align: center;
	}

	.quyu-pop .head {
		height: 100rpx;
	}

	.quyu-pop .head-item {
		height: 100rpx;
		font-size: 28rpx;
		font-weight: 500;
		color: #101010;
		line-height: 100rpx;
	}

	.quyu-pop .head-item.active {
		color: var(--blue);
	}

	.quyu-pop .body {
		height: 515rpx;
	}

	.quyu-pop .body-left {
		padding: 0 30rpx 0 75rpx;
		height: 100%;
		overflow-y: scroll;
		background: #ffffff;
		width: 50%;
	}

	.quyu-pop .body-right {
		padding: 0 30rpx 0 50rpx;
		height: 100%;
		overflow-y: scroll;
		background: #f6f7fa;
		width: 50%;
	}

	.quyu-pop .left-item.active {
		position: relative;
		color: var(--blue);
	}

	.quyu-pop .left-item.active::before {
		position: absolute;
		left: -15rpx;
		top: 50%;
		transform: translateY(-50%);
		content: '';
		width: 4rpx;
		height: 20rpx;
		background: #0091ff;
		border-radius: 2rpx;
	}

	.quyu-pop .icon1 {
		display: block;
		width: 26rpx;
		height: 26rpx;
	}

	.quyu-pop .btn1 {
		width: 320rpx;
		height: 80rpx;
		border-radius: 8rpx;
		border: 1rpx solid #cccccc;
		font-size: 30rpx;
		font-weight: 500;
		color: #898989;
		line-height: 80rpx;
		text-align: center;
	}

	.quyu-pop .btn2 {
		width: 320rpx;
		height: 80rpx;
		border-radius: 8rpx;
		background: var(--normal);
		box-shadow: 0 4rpx 40rpx 0 rgba(3, 103, 179, 0.3);
		font-size: 30rpx;
		font-weight: 500;
		color: #ffffff;
		line-height: 80rpx;
		text-align: center;
	}

	.quyu-pop .foot {
		padding: 25rpx 40rpx;
	}

	.zixun-pop {
		position: relative;
		padding: 90rpx 40rpx 40rpx;
		width: 600rpx;
		max-height: 900rpx;
		background: #ffffff;
		overflow-y: scroll;
		border-radius: 8rpx;
	}

	.zixun-pop .input-box {
		width: 100%;
		height: 90rpx;
		background: #f6f7fa;
		border-radius: 10rpx;
	}

	.zixun-pop .input {
		font-size: 30rpx;
		color: #333;
		line-height: 42rpx;
	}

	.zixun-pop .btn1 {
		width: 100%;
		height: 90rpx;
		background: #0091ff;
		box-shadow: 0 4rpx 40rpx 0 rgba(3, 103, 179, 0.3);
		border-radius: 10rpx;
		font-size: 30rpx;
		color: #ffffff;
		line-height: 90rpx;
		text-align: center;
	}

	.zixun-pop .btn2 {
		width: 100%;
		height: 90rpx;
		background: #ff7b40;
		box-shadow: 0 4rpx 40rpx 0 rgba(248, 103, 56, 0.3);
		border-radius: 10rpx;
		font-size: 30rpx;
		color: #ffffff;
		line-height: 90rpx;
		text-align: center;
	}
	.noswiper{
		width: 100%;
		height: 500rpx;
		background-color: var(--normal);
	}
	
	.bg3f{
		width:100%;
		height:auto;
		background:#fff;
		overflow:hidden;
		position:relative;
		z-index:3;
		margin-top:-150rpx;
	}
	
	.search{
		width:100%;
		height:auto;
		overflow:hidden;
		background:#fff;
		padding:40rpx 20rpx 20rpx;
		box-sizing:border-box;
		overflow:hidden;
		position:relative;
		border-radius:20rpx;
		z-index:9;
		display: flex;
		justify-content: center;
		align-items: center;
		flex-direction: row;
		.inputbox{
			width:650rpx;
			background-color: rgba(255,255,255,0.3);
			box-shadow: 0px 4rpx 30rpx rgba(184, 189, 202, 0.3);
		}
		.colf{
			color:#999;
		}
	}
</style>
